import Vue from 'vue'
import App from './App.vue'

import 'element-ui/lib/theme-chalk/index.css';
// import jquery from 'jquery'
// window.jquery = window.$ = jquery
import 'bootstrap/dist/css/bootstrap.min.css';
import 'bootstrap/dist/js/bootstrap.js'
import 'owl.carousel/dist/assets/owl.carousel.css';
import { Message,Select,Option,TimeSelect,TimePicker,DatePicker,Button, Form, FormItem,Input} from 'element-ui'
// 在调用 Vue.use 前，给 Message 添加 install 方法
Vue.prototype.$message = Message
Vue.use(Select).use(Option).use(TimeSelect).use(TimePicker).use(DatePicker).use(Button).use(Form).use(FormItem).use(Input)
import VueAwesomeSwiper from 'vue-awesome-swiper'
// swiper版本5
import 'swiper/css/swiper.css'
// 第二个参数可配置默认选项
Vue.use(VueAwesomeSwiper, {})

import animated from 'animate.css' // npm install animate.css --save安装，在引入
 
Vue.use(animated)

import './style/plugins/slick/slick.js'
import { isEn } from '@/common/util'
import '@/common/filter.js'

import './style/index.css'
if(isEn()){
  import('./style/css/en.css')
}
// import 'owl.carousel';
import router from './router'
import i18n from './i18n/'
Vue.config.productionTip = false



let vue = new Vue({
  router,
  i18n,
  render: h => h(App)
}).$mount('#app')
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = vue.$t(to.meta.title) + '_' + vue.$t('webName')
  }
  next()
})

